<!DOCTYPE html>
<html th:lang="#{lang}">
<head>
    <title th:text="|#{search}-#{title}|"></title>
    <meta name="keywords" th:content="#{keywords}">
    <meta name="description" th:content="#{description}">
    <div th:replace="common/meta"></div>
</head>
<body>
<div th:replace="common/header-back:: header(#{search.result},${lang})"></div>

<div th:replace="common/cate:: cate(${cates})"></div>
<div class="content">
    <div class="serarch">
        <form class="flexbox" action="">
            <input class="flex1" id="keyword" th:value="${word}" type="text">
            <input type="button" id="search_button" th:value="#{search.btn}">
        </form>
        <div class="hot_search">
            <h6>"<span style="color: red;" th:text="${word}">真真难为</span>"<span th:text="#{search.result}">result</span>:</h6>
        </div>
    </div>
    <div class="classification_list" data-scroll="botAjax">
        <ul>
            <li th:each="comic:${list}">
                <a th:href="|/comic/${comic.id}|">
                    <img class="pic" th:src="${comic.cover}">
                    <h3 th:text="${comic.title}">真真难为</h3>
                    <p class="author" th:text="${comic.author}">宴欢×明日桐</p>
                    <p class="story_plot ellipsis" th:text="${comic.intro}">intro..</p>
                    <span class="thumbs_up"><i></i><span style="font-size: 1.3rem;" th:text="${comic.hits}"></span></span>
                </a>
            </li>
        </ul>
    </div>
</div>
<div th:replace="common/footer"></div>
</body>
<div th:replace="common/js"></div>
<script type="text/javascript">

    function search() {
        var keyword = $("#keyword").val();
        if (keyword == "") {
            return false;
        }
        location.href = "/search/" + keyword;
    }

    $("#search_button").on("click", function () {
        return search();
    });

    document.addEventListener('keydown', function (e) {
        if (e.key === 'Enter') {
            search();
            e.preventDefault();
        }
    });

</script>
</html>


    